package com.ququ.syb.mqhandler.service;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.ququ.common.result.ResultJson;
import com.ququ.syb.mqhandler.fegin.PaymentBusinessFegin;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class PayOrderCallbackService {
    @Autowired
    private PaymentBusinessFegin paymentBusinessFegin;

    public void payOrderCallback(String message){
        JSONObject jsonObject = JSON.parseObject(message);
        ResultJson resultJson = paymentBusinessFegin.paymentCallback(jsonObject.getString("tradenum"),
                jsonObject.getInteger("status"),
                jsonObject.getString("failreason"));
    }

}
